package com.google.gwt.gfx.client.overlays;

import com.google.gwt.gfx.client.style.DefaultStyle;
import com.google.gwt.user.client.ui.Image;

public class GFXImage extends Image implements Overlay {

	public static GFXImage get(String url) {
		return ImageFactory.DEFAULT.createImage(url);
	}

	public static GFXImage get(String key, String url) {
		return ImageFactory.DEFAULT.createImage(key, url);
	}

	private DefaultStyle styleRef;

	public GFXImage() {
		super();

		styleRef = new DefaultStyle(this);

		addStyleName("gfx-Image");
	}

	@Override
	public DefaultStyle style() {
		return styleRef;
	}

}
